Optimal. Leaf size=42 \[ -\frac {a^2 \cos (c+d x)}{d}-\frac {2 a b \log (\cos (c+d x))}{d}+\frac {b^2 \sec (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 2833, 12, 43} \[ -\frac {a^2 \cos (c+d x)}{d}-\frac {2 a b \log (\cos (c+d x))}{d}+\frac {b^2 \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 2833
Rule 3872
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^2 \sin (c+d x) \, dx &=\int (-b-a \cos (c+d x))^2 \sec (c+d x) \tan (c+d x) \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {a^2 (-b+x)^2}{x^2} \, dx,x,-a \cos (c+d x)\right )}{a d}\\ &=\frac {a \operatorname {Subst}\left (\int \frac {(-b+x)^2}{x^2} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a \operatorname {Subst}\left (\int \left (1+\frac {b^2}{x^2}-\frac {2 b}{x}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a^2 \cos (c+d x)}{d}-\frac {2 a b \log (\cos (c+d x))}{d}+\frac {b^2 \sec (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 37, normalized size = 0.88 \[ \frac {b (b \sec (c+d x)-2 a \log (\cos (c+d x)))-a^2 \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 50, normalized size = 1.19 \[ -\frac {a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) - b^{2}}{d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.34, size = 50, normalized size = 1.19 \[ -\frac {a^{2} \cos \left (d x + c\right )}{d} - \frac {2 \, a b \log \left (\frac {{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} + \frac {b^{2}}{d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 45, normalized size = 1.07 \[ \frac {b^{2} \sec \left (d x +c \right )}{d}+\frac {2 a b \ln \left (\sec \left (d x +c \right )\right )}{d}-\frac {a^{2}}{d \sec \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.63, size = 40, normalized size = 0.95 \[ -\frac {a^{2} \cos \left (d x + c\right ) + 2 \, a b \log \left (\cos \left (d x + c\right )\right ) - \frac {b^{2}}{\cos \left (d x + c\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.05, size = 40, normalized size = 0.95 \[ -\frac {a^2\,\cos \left (c+d\,x\right )-\frac {b^2}{\cos \left (c+d\,x\right )}+2\,a\,b\,\ln \left (\cos \left (c+d\,x\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \sin {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________